It might be desirable to only expose the share functionality of Trilium to the Internet, and keep the application accessible only within a local network or via VPN.
To do so, a reverse proxy is required.
http://domain.com {
reverse_proxy /share http://localhost:8080/share
}
This is for newer versions where the share functionality is isolated,
for older versions it's required to also include /assets.[1]